const repeatedSubstringPattern = (s) => {
  const reg = /^(\w+)\1+$/;
  return reg.test(s);
};
